<?php /* Smarty version 2.6.20, created on 2017-07-02 20:17:57
         compiled from admin_order_pay.htm */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'number_format', 'admin_order_pay.htm', 12, false),array('modifier', 'date_format', 'admin_order_pay.htm', 14, false),)), $this); ?>
<script src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/script/jquery-1.4.4.min.js" type="text/javascript"></script>
<header>
	<div class="nav-w">
        <section class="nav-s"><a href="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/main.php"><nav>用户中心</nav></a></section>
        <section class="nav-c">订单支付</section>
        <section class="nav-e"><a href="<?php echo $this->_tpl_vars['config']['weburl']; ?>
"><nav>首页</nav></a></section>
    </div>
</header>
<link href="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/wap/css/orderpay.css" rel="stylesheet" type="text/css" />
<section class="order">
    <div class="list">
        <p>支付金额：<span class="p-price"><strong><?php echo $this->_tpl_vars['config']['money']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['de']['cost']+$this->_tpl_vars['de']['freight'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</strong></span></p>
        <p>订单编号：<?php echo $this->_tpl_vars['de']['order_id']; ?>
</p>
        <p>下单时间：<?php echo ((is_array($_tmp=$this->_tpl_vars['de']['create_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d&nbsp;%H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d&nbsp;%H:%M:%S")); ?>
</p>
    </div>
    <div class="list paymemt clearfix">
        <?php $_from = $this->_tpl_vars['paymemt']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['list']):
?>
        <?php if (( $this->_tpl_vars['list']['payment_type'] == 'wechatpay' && strpos ( $this->_tpl_vars['user_agent'] , 'MicroMessenger' ) !== false ) || ( $this->_tpl_vars['list']['payment_type'] == 'wapalipay' && strpos ( $this->_tpl_vars['user_agent'] , 'MicroMessenger' ) === false )): ?>
        <li <?php if ($this->_tpl_vars['de']['payment_id'] == $this->_tpl_vars['list']['payment_id']): ?> class="checked"<?php endif; ?>>
        <img align="top" title="<?php echo $this->_tpl_vars['list']['payment_name']; ?>
" alt="<?php echo $this->_tpl_vars['list']['payment_name']; ?>
" data-param="{'id':'<?php echo $this->_tpl_vars['list']['payment_id']; ?>
'}" src="image/payment/<?php echo $this->_tpl_vars['list']['payment_type']; ?>
.gif" /><i></i>
        </li>
        <?php endif; ?>
		<?php endforeach; endif; unset($_from); ?>
    </div>
    <input type="hidden" id="payment_id" value="<?php echo $this->_tpl_vars['de']['payment_id']; ?>
"/>
	<a class="btn-pay" href="javascript:0">支付</a>   
</section>
<script type="text/javascript">
$(".btn-pay").bind("click",function(){
	href="?m=payment&s=admin_pay&order_id=<?php echo $this->_tpl_vars['de']['order_id']; ?>
";
	payment_id=$("#payment_id").val();
	if(!payment_id)
	{
		alert("Please choose the payment method!");
		return false;
	}
	window.location=href+"&payment="+payment_id;
	return false;
});
$(".paymemt li").bind("click",function(){
	var data = $(this).children('img').attr('data-param');
	eval("data = "+data);
	$("#payment_id").val(data.id);
	$(this).addClass("checked").siblings().removeClass("checked");
});
</script>